mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-12-22 09:13:19 +01:00
tweak location display logic
This commit is contained in:
parent
519e587e5a
commit
4cdb1ed0c0
@ -42,33 +42,36 @@ export default function Location() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
{!isPending && location?.now?.city ? (
|
{!isPending ? (
|
||||||
<Animation>
|
<Animation>
|
||||||
<Flag
|
{location?.now?.city ? (
|
||||||
country={{
|
<>
|
||||||
code: location.now.country_code,
|
<Flag
|
||||||
name: location.now.country
|
country={{
|
||||||
}}
|
code: location.now.country_code,
|
||||||
/>
|
name: location.now.country
|
||||||
{location.now.city} <span>Now</span>
|
}}
|
||||||
<div className={styles.next}>
|
/>
|
||||||
{location?.next?.city && (
|
{location.now.city} <span>Now</span>
|
||||||
<>
|
</>
|
||||||
{isDifferentCountry && (
|
) : null}
|
||||||
<Flag
|
|
||||||
country={{
|
{location?.next?.city && (
|
||||||
code: location.next.country_code,
|
<div className={styles.next}>
|
||||||
name: location.next.country
|
{isDifferentCountry && (
|
||||||
}}
|
<Flag
|
||||||
/>
|
country={{
|
||||||
)}
|
code: location.next.country_code,
|
||||||
{location.next.city}{' '}
|
name: location.next.country
|
||||||
<span>
|
}}
|
||||||
{relativeTime.from(new Date(location.next.date_start))}
|
/>
|
||||||
</span>
|
)}
|
||||||
</>
|
{location.next.city}{' '}
|
||||||
)}
|
<span>
|
||||||
</div>
|
{relativeTime.from(new Date(location.next.date_start))}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</Animation>
|
</Animation>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user