Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Alder Whiteford authored and Alder Whiteford committed Jun 12, 2024
1 parent d93de67 commit ce3b4ef
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion backend/entities/events/previews/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

type Common struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Name string `json:"name"`
EventType models.EventType `json:"event_type"`
Location string `json:"location"`
Link string `json:"link"`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Event, EventPreview } from '@generatesac/lib';
import { EventPreview } from '@generatesac/lib';

import { DAY_EPOCH_TIME } from '@/src/app/(design-system)/components/Calendar/Calendar';
import {
Expand All @@ -12,8 +12,8 @@ const eventPreviewImages = [
'https://d3jmn01ri1fzgl.cloudfront.net/photoadking/webp_thumbnail/curious-blue-events-instagram-post-template-40q50e11b340f0.webp',
'https://d1csarkz8obe9u.cloudfront.net/posterpreviews/event-social-media-ad-design-template-6549b45cb5b52f594c8b37d7060c290d_screen.jpg?ts=1570209911',
'https://d3jmn01ri1fzgl.cloudfront.net/photoadking/webp_thumbnail/wild-sand-events-instagram-post-template-f767rn00607ef2.webp',
'https://images.template.net/59201/Red-Nose-Day-Event-Instagram-Post-Template.jpeg',
]
'https://images.template.net/59201/Red-Nose-Day-Event-Instagram-Post-Template.jpeg'
];

export function parseData(start: number, end: number, data?: EventPreview[]) {
// Parsed data:
Expand Down Expand Up @@ -71,7 +71,9 @@ export function parseData(start: number, end: number, data?: EventPreview[]) {
title: event.name,
startTime: event.start_time,
endTime: event.end_time,
image: eventPreviewImages[Math.floor(Math.random() * eventPreviewImages.length)],
image: eventPreviewImages[
Math.floor(Math.random() * eventPreviewImages.length)
],
host: event.host_name,
tags: event.tags
};
Expand All @@ -84,7 +86,9 @@ export function parseData(start: number, end: number, data?: EventPreview[]) {
if (parsedData[index].data[startTime].events.length >= 3) {
parsedData[index].data[startTime].overflow = true;
} else {
parsedData[index].data[startTime].events.push(eventPreview);
parsedData[index].data[startTime].events.push(
eventPreview
);
}
} else {
// Create a new time:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export const EventCardCalendar: React.FC<EventCardCalendarProps> = ({
source={{ uri: image }}
/>
<Box flex={2.5} flexDirection="column" gap="xxs">
<Text variant="body-1">{event.length >= 28 ? `${event.slice(0, 28).trim()}...` : event}</Text>
<Text variant="body-1">
{event.length >= 28
? `${event.slice(0, 28).trim()}...`
: event}
</Text>
<Box {...styles.cardContentContainer}>
<Text variant="caption-1" color="darkGray">
{`${eventTime(
Expand All @@ -78,7 +82,9 @@ export const EventCardCalendar: React.FC<EventCardCalendarProps> = ({
source={{ uri: logo }}
/>
<Text color="darkGray" variant="caption-1">
{club.length >= 16 ? `${club.slice(0, 16).trim()}...` : club}
{club.length >= 16
? `${club.slice(0, 16).trim()}...`
: club}
</Text>
</Box>
</Box>
Expand Down

0 comments on commit ce3b4ef

Please sign in to comment.