Skip to content

Commit

Permalink
fix: use development settings for previews also
Browse files Browse the repository at this point in the history
  • Loading branch information
Adventune committed Jul 7, 2024
1 parent 4c47e6b commit e50a33b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
5 changes: 4 additions & 1 deletion api/eventService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ type AssemblyEvent = {
};

const determineEvent = (): string => {
if (process.env.EXPO_PUBLIC_ENVIRONMENT === 'development') {
if (
process.env.EXPO_PUBLIC_ENVIRONMENT === 'development' ||
process.env.EXPO_PUBLIC_ENVIRONMENT === 'preview'
) {
return 'summer23';
}
const now = new Date();
Expand Down
26 changes: 14 additions & 12 deletions components/timetable/Event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,20 @@ const Event = ({ title, location, start, end, color, thumbnail }: EventProps) =>
backgroundColor: color,
}}
>
{dayjs().isAfter(end) && process.env.EXPO_PUBLIC_ENVIRONMENT !== 'development' && (
<View
style={{
position: 'absolute',
width: '100%',
height: '100%',
backgroundColor: 'rgba(0, 0, 0, 0.75)',
borderRadius: 8,
zIndex: 10,
}}
/>
)}
{dayjs().isAfter(end) &&
process.env.EXPO_PUBLIC_ENVIRONMENT !== 'development' &&
process.env.EXPO_PUBLIC_ENVIRONMENT !== 'preview' && (
<View
style={{
position: 'absolute',
width: '100%',
height: '100%',
backgroundColor: 'rgba(0, 0, 0, 0.75)',
borderRadius: 8,
zIndex: 10,
}}
/>
)}
{thumbnail && (
<Image
source={{ uri: thumbnail }}
Expand Down

0 comments on commit e50a33b

Please sign in to comment.