Both important but..
Both genetics & lifestyle are important factors in longevity
but we are learning that lifestyle plays the larger role.
This is because lifestyle affects genetic expression via epigenetics.We have 2 copies of each gene. Often one is more functional than the other & lifestyle (including mental attitude) affects which copy of the gene is expressed more. So genes influence but don't determine our fate!