Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timezone issue #170

Merged
merged 257 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
257 commits
Select commit Hold shift + click to select a range
4bf8d41
Merge pull request #5 from LazerTechnologies/schedule-time-update
ximxim Aug 7, 2023
a33ad20
Merge pull request #4 from LazerTechnologies/external-link
ximxim Aug 7, 2023
1d0a7c6
Merge pull request #2 from LazerTechnologies/seo-work
ximxim Aug 7, 2023
6f56e25
Merge pull request #7 from LazerTechnologies/fix-get-now-spoof
lauchness Aug 7, 2023
c908114
docs: update readme file
ximxim Aug 7, 2023
1dcfc57
Merge pull request #8 from LazerTechnologies/staging
lauchness Aug 7, 2023
ed9ca2b
Merge pull request #3 from LazerTechnologies/generate-tweets
ximxim Aug 7, 2023
3b2996e
Merge pull request #9 from LazerTechnologies/staging
lauchness Aug 7, 2023
1c22b17
chore: teaser page layout cleanup
DjordjeVujatovic Aug 7, 2023
6f3040f
chore: added github workflow to commit empty message to trigger Verce…
ximxim Aug 7, 2023
2e9fe3d
chore: testing with repo url
ximxim Aug 7, 2023
9523dd8
chore: testing with repo owner logic
ximxim Aug 7, 2023
83b6d9f
chore: synced schedule dates
ximxim Aug 7, 2023
61a499c
chore: update footer design + layout
DjordjeVujatovic Aug 7, 2023
fee06ec
feat: replace next-image with img to avoid caching issues
lauchness Aug 7, 2023
71d6f4f
Merge pull request #10 from LazerTechnologies/allow-external-users-to…
wilsoncusack Aug 8, 2023
8bbe26d
empty commit
ximxim Aug 8, 2023
90e5b59
feat: restructure validation logic to support zora and external, exte…
wilsoncusack Aug 7, 2023
1bdd3fa
feat: show max per user mint in button message
wilsoncusack Aug 7, 2023
68b5b99
feat: refactor to enable zora write tx
wilsoncusack Aug 7, 2023
dca219f
feat: allow zora native minting
wilsoncusack Aug 7, 2023
7394a68
fix: sync useValidate
wilsoncusack Aug 7, 2023
7c39aa0
feat: add zora test mint
wilsoncusack Aug 7, 2023
daff830
feat: new crossmint id
wilsoncusack Aug 7, 2023
021a1be
fix: crossmint working with zora
wilsoncusack Aug 7, 2023
a73537b
empty commit
ximxim Aug 8, 2023
e112cdd
chore: add links to footer
DjordjeVujatovic Aug 8, 2023
f2e1249
chore: undo mobile nav styles
DjordjeVujatovic Aug 8, 2023
d22ba40
chore: implement new mobile nav design
DjordjeVujatovic Aug 8, 2023
6982853
fix: top margin for community
arpitsrivastava-cb Aug 8, 2023
80701f3
empty commit
ximxim Aug 8, 2023
95f83a6
fix: padding issue
arpitsrivastava-cb Aug 8, 2023
582c4ac
empty commit
ximxim Aug 8, 2023
fdc7379
feat: remove console.log
lauchness Aug 8, 2023
02fe7da
Merge pull request #11 from LazerTechnologies/nft-asset-not-showing-u…
lauchness Aug 8, 2023
ae194d1
Merge pull request #16 from LazerTechnologies/staging
lauchness Aug 8, 2023
bcb8a71
fix: lint fixes on add-zora branch
lauchness Aug 8, 2023
fb6cced
feat: make address pill an external link
lauchness Aug 8, 2023
b827dac
Merge pull request #15 from LazerTechnologies/arpit/fix-padding
lauchness Aug 8, 2023
5278757
Merge pull request #14 from LazerTechnologies/arpit/fix-community
lauchness Aug 8, 2023
5d1ac85
Merge pull request #20 from LazerTechnologies/staging
lauchness Aug 8, 2023
5707a38
Merge pull request #17 from LazerTechnologies/add-zora/lint-fixes
lauchness Aug 8, 2023
e58024e
Merge pull request #19 from LazerTechnologies/ens-links
lauchness Aug 8, 2023
7e3d5f7
Merge pull request #21 from LazerTechnologies/staging
lauchness Aug 8, 2023
6a4c536
Merge pull request #18 from LazerTechnologies/syncing-schedule
ximxim Aug 8, 2023
67d7cac
Merge pull request #22 from LazerTechnologies/staging
ximxim Aug 8, 2023
1baf6e3
fix: schedule issue
ximxim Aug 8, 2023
de20af6
Merge branch 'staging'
ximxim Aug 8, 2023
fc43356
Merge pull request #1 from LazerTechnologies/wilson/add-zora
lauchness Aug 8, 2023
abc3a42
Merge pull request #23 from LazerTechnologies/staging
lauchness Aug 8, 2023
2811029
empty commit
ximxim Aug 8, 2023
969dcc6
feat: replace next-image with img to avoid caching issues
lauchness Aug 7, 2023
271f43d
feat: remove console.log
lauchness Aug 8, 2023
670fab1
empty commit
ximxim Aug 8, 2023
c89c50d
empty commit
ximxim Aug 8, 2023
539cd9b
fix: schedule issue
ximxim Aug 8, 2023
d643f25
feat: restructure validation logic to support zora and external, exte…
wilsoncusack Aug 7, 2023
07c7a03
feat: show max per user mint in button message
wilsoncusack Aug 7, 2023
cb3addf
feat: refactor to enable zora write tx
wilsoncusack Aug 7, 2023
263ec79
feat: allow zora native minting
wilsoncusack Aug 7, 2023
1913e93
fix: sync useValidate
wilsoncusack Aug 7, 2023
82af47b
feat: add zora test mint
wilsoncusack Aug 7, 2023
dc2aa53
feat: new crossmint id
wilsoncusack Aug 7, 2023
7f6d0ec
fix: crossmint working with zora
wilsoncusack Aug 7, 2023
0084c72
empty commit
ximxim Aug 8, 2023
4439a6e
fix: lint fixes on add-zora branch
lauchness Aug 8, 2023
031dba8
Merge pull request #24 from LazerTechnologies/master-sync
lauchness Aug 8, 2023
06e0190
feat: add zora contract to test-contracts and add minttype
lauchness Aug 8, 2023
bc19cf1
fix: fix base config for testnet
lauchness Aug 8, 2023
4aed130
Merge pull request #13 from LazerTechnologies/chore/implement-mobile-…
DjordjeVujatovic Aug 8, 2023
b85208c
Merge pull request #26 from LazerTechnologies/staging
DjordjeVujatovic Aug 8, 2023
b8902b0
Merge pull request #12 from LazerTechnologies/chore/layout-and-paddin…
DjordjeVujatovic Aug 8, 2023
49ca067
Merge pull request #27 from LazerTechnologies/staging
DjordjeVujatovic Aug 8, 2023
f4f1315
chore: update footer links
DjordjeVujatovic Aug 8, 2023
6a7d51c
feat: typography styles
lauchness Aug 8, 2023
a315388
chore: add featured title community page
DjordjeVujatovic Aug 8, 2023
380c5e0
feat: custom typography responsive
lauchness Aug 8, 2023
4438fc2
chore: fix nav button sizing
DjordjeVujatovic Aug 8, 2023
111a30a
feat: trending page layout
lauchness Aug 8, 2023
e9b4f75
Merge pull request #30 from LazerTechnologies/fix/connect-wallet-butt…
DjordjeVujatovic Aug 8, 2023
d183eda
Merge pull request #31 from LazerTechnologies/staging
DjordjeVujatovic Aug 8, 2023
efc506b
chore: changed mobile navbar globally
ximxim Aug 8, 2023
bef40c8
fix: banner icon to be used in past and upcoming both
ximxim Aug 8, 2023
7c53b9a
chore: redirect to live stream from /live path
ximxim Aug 8, 2023
dcac580
chore: added anirud-samala in git workflow
ximxim Aug 8, 2023
34c0ec2
Merge branch 'staging'
ximxim Aug 8, 2023
9c40e55
feat: mint analytics events
lukasrosario Aug 8, 2023
af3ff96
fix: undo change
lukasrosario Aug 8, 2023
760048f
fix: undo change from other repo
lukasrosario Aug 8, 2023
37c7019
empty commit
ximxim Aug 8, 2023
7eaad43
chore: update tending page and component designs
DjordjeVujatovic Aug 8, 2023
37869bd
Merge pull request #25 from LazerTechnologies/zora-contract-and-base-fix
wilsoncusack Aug 8, 2023
df076fa
empty commit
ximxim Aug 8, 2023
621c56d
chore: fix trending page top spacing
DjordjeVujatovic Aug 8, 2023
e780a2d
chore: fix partnerhero position on home page
DjordjeVujatovic Aug 8, 2023
fa7ceba
chore: remove empty space
DjordjeVujatovic Aug 8, 2023
f5eed6a
feat: new images on community page, make clickable
wilsoncusack Aug 8, 2023
a8e7165
empty commit
ximxim Aug 8, 2023
1825f81
chore: fix PageContainer logic
DjordjeVujatovic Aug 8, 2023
37ca7c3
Merge pull request #35 from LazerTechnologies/lukas/mint-events
lukasrosario Aug 8, 2023
93229c0
empty commit
ximxim Aug 8, 2023
ed7f7cf
feat: use mintWithRewards for zora
wilsoncusack Aug 8, 2023
b71c9d4
feat: update zora test contracts
wilsoncusack Aug 8, 2023
6061885
empty commit
ximxim Aug 8, 2023
9bcb786
Merge pull request #32 from LazerTechnologies/mobile-nav-bar
ximxim Aug 8, 2023
7ce28ec
Merge pull request #33 from LazerTechnologies/redirect-live
ximxim Aug 8, 2023
65d682f
chore: base banner image updated
ximxim Aug 8, 2023
44424c3
chore: undo page container changes
DjordjeVujatovic Aug 8, 2023
a266552
Merge pull request #29 from LazerTechnologies/community/add-featured-…
DjordjeVujatovic Aug 8, 2023
4d79252
Merge pull request #28 from LazerTechnologies/chore/fix-footer-links
DjordjeVujatovic Aug 8, 2023
8743dbf
fix: twitter module null error
ximxim Aug 9, 2023
50116d0
Merge pull request #40 from LazerTechnologies/staging
DjordjeVujatovic Aug 9, 2023
b49f5a6
chore: not writing to file if no data is returned
ximxim Aug 9, 2023
4e2da30
chore: silent failure
ximxim Aug 9, 2023
ab6c68a
chore: partially updated schedule
ximxim Aug 9, 2023
9e201f4
chore: deleting file only when writing to it
ximxim Aug 9, 2023
3fdbe16
Merge pull request #34 from LazerTechnologies/banner-image-use-in-past
ximxim Aug 9, 2023
db92cca
chore: merged staging and resolved conflicts
ximxim Aug 9, 2023
b5be243
Merge pull request #38 from LazerTechnologies/wilson/community
lauchness Aug 9, 2023
d64fb50
Merge pull request #37 from LazerTechnologies/trending/update-design
lauchness Aug 9, 2023
df613d9
feat: button using base text size and disabled state
lauchness Aug 9, 2023
ebb7001
Merge branch 'staging' into typography-system
lauchness Aug 9, 2023
7b77187
chore: made tweet cards clickable
ximxim Aug 9, 2023
f72b156
chore: updated schedule partners and base contract
ximxim Aug 9, 2023
790bae6
Merge branch 'wilson/zora-update' into config-updates
ximxim Aug 9, 2023
ed36e5a
Merge pull request #36 from LazerTechnologies/wilson/zora-update
wilsoncusack Aug 9, 2023
6e8eadb
empty commit
ximxim Aug 9, 2023
3477399
chore: work
ximxim Aug 9, 2023
57f9767
chore: empty commit
ximxim Aug 9, 2023
1be870c
Merge pull request #39 from LazerTechnologies/fix-twitter-module
ximxim Aug 9, 2023
180f3d0
chore: base config update
ximxim Aug 9, 2023
0a30a7d
Merge branch 'staging' into config-updates
ximxim Aug 9, 2023
79ab6a0
feat: add checking for home page, fix partnerhero placement
DjordjeVujatovic Aug 9, 2023
cebddf6
fix: add check for window obj
DjordjeVujatovic Aug 9, 2023
beb26b7
fix: catch user rejected request on mint dot fun mint
wilsoncusack Aug 9, 2023
bf7239f
empty commit
ximxim Aug 9, 2023
350b07b
Merge pull request #43 from LazerTechnologies/fix/partner-hero-homepa…
DjordjeVujatovic Aug 9, 2023
ab09692
chore: dummy arweave ID for testing
ximxim Aug 9, 2023
884e2ff
Merge pull request #41 from LazerTechnologies/staging
DjordjeVujatovic Aug 9, 2023
013b639
feat: navbar typography and layout fixes
lauchness Aug 9, 2023
7610453
chore: base day one config
ximxim Aug 9, 2023
7da5575
Merge pull request #42 from LazerTechnologies/config-updates
ximxim Aug 9, 2023
60ab766
Merge pull request #44 from LazerTechnologies/wilson/fix-mint-dot-fun
wilsoncusack Aug 9, 2023
0467afe
empty commit
ximxim Aug 9, 2023
1b8c397
Merge pull request #45 from LazerTechnologies/staging
ximxim Aug 9, 2023
533b131
chore: change base day one to aug 9
ximxim Aug 9, 2023
6fba7dc
Merge branch 'staging'
ximxim Aug 9, 2023
e707965
feat: page layout
lauchness Aug 9, 2023
c106531
chore: clamping to nearest work
ximxim Aug 9, 2023
0710331
chore: updated tweets file
ximxim Aug 9, 2023
07bb24b
Merge pull request #46 from LazerTechnologies/clamp-tweets
ximxim Aug 9, 2023
89b9635
Merge pull request #47 from LazerTechnologies/staging
ximxim Aug 9, 2023
5c8d415
feat: make mint.fun clickable
wilsoncusack Aug 9, 2023
0f9e6a3
chore: added spacing and took away dollar sign from community grant s…
ximxim Aug 9, 2023
d5d92dd
empty commit
ximxim Aug 9, 2023
9d5efb7
feat: mobile nav fixed
lauchness Aug 9, 2023
7eb6eab
feat: not found typography
lauchness Aug 9, 2023
907725c
chore: added spacing between total and number
ximxim Aug 9, 2023
4379356
feat: partner hero typography
lauchness Aug 9, 2023
74128a5
feat: restyle arweve component
DjordjeVujatovic Aug 9, 2023
7db8db8
feat: trending and drop card typographies
lauchness Aug 9, 2023
53187ec
feat: trending and tabs typography
lauchness Aug 9, 2023
1ba40d6
fix: add more spacing
arpitsrivastava-cb Aug 9, 2023
5e789c8
empty commit
ximxim Aug 9, 2023
74c6270
feat: community page typography
lauchness Aug 9, 2023
5e51c77
Merge branch 'staging' into typography-system
lauchness Aug 9, 2023
4f29bb8
chore: add new icon for base
DjordjeVujatovic Aug 9, 2023
5bddde2
Merge pull request #50 from LazerTechnologies/feat/restyle-arweve-com…
DjordjeVujatovic Aug 9, 2023
eb0f079
Merge pull request #53 from LazerTechnologies/staging
DjordjeVujatovic Aug 9, 2023
0bc2e85
chore: updated community start and end dates
AshishYelekar Aug 9, 2023
b0e2ac3
Merge pull request #51 from LazerTechnologies/arpit/add-more-padding
DjordjeVujatovic Aug 9, 2023
d73575d
Merge pull request #54 from LazerTechnologies/staging
DjordjeVujatovic Aug 9, 2023
ab68a4c
empty message
AshishYelekar Aug 9, 2023
90ff645
feat: add prop house
arpitsrivastava-cb Aug 9, 2023
c272df5
empty commit
ximxim Aug 9, 2023
5e8108b
Merge pull request #48 from LazerTechnologies/wilson/clickable-fun
wilsoncusack Aug 9, 2023
e7378c4
Merge pull request #49 from LazerTechnologies/community-spacing-format
wilsoncusack Aug 9, 2023
ff7f00c
empty commit
ximxim Aug 9, 2023
8455694
Merge pull request #55 from LazerTechnologies/arpit/add-prop-house
wilsoncusack Aug 9, 2023
57308ee
empty commit
ximxim Aug 9, 2023
dfb3929
Merge branch 'staging' into typography-system
lauchness Aug 9, 2023
6374bcf
fix: remove color from typography
lauchness Aug 9, 2023
053d013
chore: update arweave for base day one and partner descriptions
wilsoncusack Aug 9, 2023
49546e7
chore: add dev arweave for base day one
wilsoncusack Aug 9, 2023
d556b86
empty commit
ximxim Aug 9, 2023
03972c4
feat: mobile nav layout shift fix
lauchness Aug 9, 2023
30be72b
feat: mint dialog typography
lauchness Aug 9, 2023
91cb388
feat: remove commented old layout
lauchness Aug 9, 2023
69bf70f
Merge pull request #56 from LazerTechnologies/wilson/latest-content
wilsoncusack Aug 9, 2023
131cd5c
empty commit
ximxim Aug 9, 2023
d01006d
Merge pull request #57 from LazerTechnologies/staging
lauchness Aug 9, 2023
039ad0f
Merge branch 'staging' into typography-system
lauchness Aug 9, 2023
d727adb
chore: base day one completely separate
ximxim Aug 9, 2023
bb18c78
Merge pull request #58 from LazerTechnologies/fix-teaser
ximxim Aug 9, 2023
6980323
Merge pull request #59 from LazerTechnologies/staging
ximxim Aug 9, 2023
af97c72
Merge pull request #52 from LazerTechnologies/typography-system
ximxim Aug 9, 2023
a613927
Merge pull request #60 from LazerTechnologies/staging
ximxim Aug 9, 2023
7cb7b8e
feat: use tailwind prose for article
lauchness Aug 9, 2023
7ea3aab
chore: updated description of partners based on the execution tracker…
ximxim Aug 9, 2023
b7f6609
feat: line clamp on calendar card description
lauchness Aug 9, 2023
14f273b
chore: changed contract address
ximxim Aug 9, 2023
2504a0d
Merge pull request #63 from LazerTechnologies/base-day-one-contract-u…
ximxim Aug 9, 2023
e520634
Merge pull request #65 from LazerTechnologies/staging
ximxim Aug 9, 2023
b58c0f8
chore: actioned column X of the tracker sheet
ximxim Aug 9, 2023
60ca6aa
Merge pull request #62 from LazerTechnologies/calendar-card-descripti…
wilsoncusack Aug 9, 2023
186893a
empty commit
ximxim Aug 9, 2023
3566ba3
Merge pull request #64 from LazerTechnologies/article-use-prose
wilsoncusack Aug 9, 2023
25cc708
empty commit
ximxim Aug 9, 2023
19f7d58
chore: actioned brand color and name for base day one
ximxim Aug 9, 2023
54bc0f9
chore: changed
ximxim Aug 9, 2023
4988b98
Merge pull request #61 from LazerTechnologies/description-update
ximxim Aug 9, 2023
4df7047
Merge pull request #67 from LazerTechnologies/staging
ximxim Aug 9, 2023
559b90d
chore: resolved conflicts
ximxim Aug 9, 2023
8479c5c
chore: fix copy
DjordjeVujatovic Aug 9, 2023
de53c3d
chore: change docs to help center
DjordjeVujatovic Aug 9, 2023
bfec7cd
chore: fix mobile menu close bug
DjordjeVujatovic Aug 9, 2023
057a7de
Merge remote-tracking branch 'upstream/master'
ximxim Aug 9, 2023
0e1f4fb
fix: scroll area in partner hero full height
lauchness Aug 9, 2023
506f91f
feat: round price to 4 digits
lauchness Aug 9, 2023
f6eeeaf
Merge pull request #70 from LazerTechnologies/fix-mobile-scroll-area
lauchness Aug 9, 2023
e5e53c2
Merge pull request #71 from LazerTechnologies/staging
lauchness Aug 9, 2023
8e03c42
Merge pull request #69 from LazerTechnologies/chore/fix-mobile-menu
DjordjeVujatovic Aug 9, 2023
5602250
Merge pull request #72 from LazerTechnologies/staging
DjordjeVujatovic Aug 9, 2023
744f8cb
Merge pull request #68 from LazerTechnologies/chore/fix-copy
DjordjeVujatovic Aug 9, 2023
ca4c2f5
Merge pull request #73 from LazerTechnologies/staging
DjordjeVujatovic Aug 9, 2023
727f4f7
chore: arweave script
ximxim Aug 9, 2023
24f4377
Merge branch 'staging' into cache-mirror
ximxim Aug 9, 2023
3028c59
chore: getting article from arweave file
ximxim Aug 9, 2023
2cf5cff
Wrap article in try catch (#157)
lauchness Aug 9, 2023
7c8cbd8
sync cb (#159)
wilsoncusack Aug 9, 2023
6c7537e
empty commit
ximxim Aug 9, 2023
96c1a56
empty commit
ximxim Aug 9, 2023
40ec03d
chore: merged staging
ximxim Aug 9, 2023
c0cac5d
chore: removed console log
ximxim Aug 9, 2023
7492bcf
chore: password protect endpoint
ximxim Aug 9, 2023
910c3fe
Merge remote-tracking branch 'upstream/master' into master-test
ximxim Aug 9, 2023
47ac4e8
Merge remote-tracking branch 'upstream/master'
ximxim Aug 9, 2023
f867c7a
empty commit
ximxim Aug 9, 2023
bb298fd
Merge pull request #75 from LazerTechnologies/cache-mirror
ximxim Aug 9, 2023
b243459
Merge pull request #76 from LazerTechnologies/staging
ximxim Aug 9, 2023
3069fe0
chore: update fwb description
DjordjeVujatovic Aug 9, 2023
afc499d
feat: remove est time from getNow
lauchness Aug 9, 2023
297f114
feat: fix spacing in partner hero
lauchness Aug 9, 2023
27d1880
feat: fix tz date formatting for app/page and app/[slug]/page
lauchness Aug 9, 2023
0e8a17d
Merge pull request #78 from LazerTechnologies/partner-hero-spacing
lauchness Aug 9, 2023
f7d0c5c
Merge pull request #77 from LazerTechnologies/chore/update-fwb-descri…
ximxim Aug 9, 2023
335e9a9
Merge branch 'master' into fix-tx-issue
lauchness Aug 9, 2023
8035d28
fix: format today string based on UTC values
lauchness Aug 9, 2023
24b8448
feat: get drop date formatting
lauchness Aug 9, 2023
f7ec944
Merge remote-tracking branch 'upstream/master' into fix-timezone-issue
lauchness Aug 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { website } from '@/config/website'
import { getDrops } from '@/utils/getDrops'
import { getNow } from '@/utils/getNow'
import { getArweaves } from '@/utils/getArweaves'
import { getDropDate } from '@/utils/getDropDate'

type Props = {
params: { slug: string }
Expand Down Expand Up @@ -137,8 +138,7 @@ export async function generateMetadata(

async function getPartner(slug: string, spoofDate?: string) {
const now = getNow(spoofDate)

const today = format(now, 'yyyy-MM-dd')
const today = getDropDate(spoofDate)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lauchness does this rely on spoofdate everywhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It allows for spoof date, but relys on UTC time under the hood


const date = Object.keys(schedule).find(
(date) => schedule[date].slug === slug
Expand Down
8 changes: 3 additions & 5 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { RightArrow } from '@/components/icons/RightArrow'
import { getTweets } from '@/utils/getTweets'
import { getNow } from '@/utils/getNow'
import { getArweaves } from '@/utils/getArweaves'
import { getDropDate } from '@/utils/getDropDate'

type Props = {
searchParams: { [key: string]: string | string[] | undefined }
Expand Down Expand Up @@ -168,15 +169,12 @@ const INITIAL_TABS: TabsComponentProps = {

async function getPageData(spoofDate?: string) {
const now = getNow(spoofDate)
const today = format(now, 'yyyy-MM-dd')
const today = getDropDate(spoofDate)

const featuredPartner = schedule[today] || schedule[Object.keys(schedule)[0]]

const tabs: TabsComponentProps = Object.keys(schedule).reduce((acc, date) => {
const comparison = compareAsc(
now,
new Date(date).getTime() + 4 * 60 * 60 * 1000
)
const comparison = compareAsc(now, new Date(date).getTime())
const partner = schedule[date]

if (comparison === 0 || typeof partner === 'undefined') {
Expand Down
5 changes: 0 additions & 5 deletions src/components/PartnerHero/PartnerHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ export const PartnerHero: FC<PartnerHeroProps> = ({
teaser,
customHeader,
}) => {
const { isAfterEndDate, isBeforeStartDate } = getDateRangeValidation({
startDate: headline.startDate,
endDate: headline.endDate,
})

return (
<section className="grid p-5 md:p-6 rounded-3xl md:rounded-[32px] bg-white shadow-large w-full md:grid-cols-[5fr,7fr] lg:grid-cols-[456px,1fr] gap-5 md:gap-10">
<div className="relative w-full aspect-square mb-1 lg:mb-0 order-1 md:order-2 xl:aspect-[7/5]">
Expand Down
17 changes: 17 additions & 0 deletions src/utils/getDropDate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { getNow } from './getNow'

const padNumber = (num: number) => {
return num < 10 ? `0${num}` : num
}

export const getDropDate = (spoofDate?: string | null) => {
const now = getNow(spoofDate)
const date = new Date(now)
const year = date.getUTCFullYear()
const month = padNumber(date.getUTCMonth() + 1)
const hours = date.getUTCHours()
const day = hours >= 16 ? date.getUTCDate() : date.getUTCDate() - 1

const today = `${year}-${month}-${padNumber(day)}`
return today
}
18 changes: 14 additions & 4 deletions src/utils/getNow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,27 @@ const getSpoofDateFromParams = () => {

export const getNow = (spoofDate?: string | null) => {
const value = spoofDate || getSpoofDateFromParams() || defaultSpoofDate
const nowEST = new Date().getTime() - 4 * 60 * 60 * 1000
const nowUTC = new Date().getTime()

if (!ALLOW_SPOOFING) {
return nowEST
return nowUTC
}

const spoofedDate = value ? new Date(value) : undefined

const isValidDate = isValid(spoofedDate)

const now = isValidDate && spoofedDate ? spoofedDate.getTime() : nowEST
if (isValidDate && spoofedDate) {
return Date.UTC(
spoofedDate.getFullYear(),
spoofedDate.getMonth(),
spoofedDate.getDate(),
spoofedDate.getHours(),
spoofedDate.getMinutes(),
spoofedDate.getSeconds(),
spoofedDate.getMilliseconds()
)
}

return now
return nowUTC
}