mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-09 20:12:26 +10:00
Merge pull request #2219 from mtdvlpr/main
fix(templates): don't show section when all items are hidden
This commit is contained in:
@ -186,7 +186,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid">
|
<section id={section.id} className="grid">
|
||||||
|
|||||||
@ -177,7 +177,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid grid-cols-5 border-t pt-2.5">
|
<section id={section.id} className="grid grid-cols-5 border-t pt-2.5">
|
||||||
|
|||||||
@ -182,7 +182,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid">
|
<section id={section.id} className="grid">
|
||||||
|
|||||||
@ -197,7 +197,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid">
|
<section id={section.id} className="grid">
|
||||||
|
|||||||
@ -184,7 +184,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid">
|
<section id={section.id} className="grid">
|
||||||
|
|||||||
@ -192,7 +192,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid">
|
<section id={section.id} className="grid">
|
||||||
|
|||||||
@ -196,7 +196,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid">
|
<section id={section.id} className="grid">
|
||||||
|
|||||||
@ -191,7 +191,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid">
|
<section id={section.id} className="grid">
|
||||||
|
|||||||
@ -180,7 +180,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className={cn("grid", dateKey !== undefined && "gap-y-4")}>
|
<section id={section.id} className={cn("grid", dateKey !== undefined && "gap-y-4")}>
|
||||||
|
|||||||
@ -197,7 +197,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid">
|
<section id={section.id} className="grid">
|
||||||
|
|||||||
@ -212,7 +212,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid">
|
<section id={section.id} className="grid">
|
||||||
|
|||||||
@ -178,7 +178,7 @@ const Section = <T,>({
|
|||||||
summaryKey,
|
summaryKey,
|
||||||
keywordsKey,
|
keywordsKey,
|
||||||
}: SectionProps<T>) => {
|
}: SectionProps<T>) => {
|
||||||
if (!section.visible || section.items.length === 0) return null;
|
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id} className="grid">
|
<section id={section.id} className="grid">
|
||||||
|
|||||||
Reference in New Issue
Block a user