The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
modified UI and activity log in website (#4935)
Ady Beraudb42a892c7b5e
diff --git a/packages/twenty-website/src/app/_components/contributors/ActivityLog.tsx b/packages/twenty-website/src/app/_components/contributors/ActivityLog.tsxindex 18323a6b764..34c7b739f56 100644--- a/packages/twenty-website/src/app/_components/contributors/ActivityLog.tsx+++ b/packages/twenty-website/src/app/_components/contributors/ActivityLog.tsx@@ -5,6 +5,7 @@ import { TimeRange } from '@nivo/calendar';import { CardContainer } from '@/app/_components/contributors/CardContainer';import { Title } from '@/app/_components/contributors/Title';+import { getActivityEndDate } from '@/app/contributors/utils/get-activity-end-date';const CalendarContentContainer = styled.div`@media (max-width: 890px) {@@ -23,6 +24,8 @@ export const ActivityLog = ({if (!data.length) {return null;}+ const endDate = getActivityEndDate(data);+return (<CardContainer><Title>Activity</Title>@@ -31,6 +34,7 @@ export const ActivityLog = ({height={150}width={725}data={data}+ to={endDate}emptyColor="#F4EFFF"colors={['#E9DFFF', '#B28FFE', '#915FFD']}weekdayTicks={[]}diff --git a/packages/twenty-website/src/app/_components/ui/layout/Breadcrumbs.tsx b/packages/twenty-website/src/app/_components/ui/layout/Breadcrumbs.tsxindex 88a4a63107a..c3df927a506 100644--- a/packages/twenty-website/src/app/_components/ui/layout/Breadcrumbs.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/Breadcrumbs.tsx@@ -21,6 +21,7 @@ const InternalLinkItem = styled(Link)`color: #b3b3b3;&:hover {color: ${Theme.text.color.quarternary};+ text-decoration: underline;}`;diff --git a/packages/twenty-website/src/app/_components/ui/layout/FooterDesktop.tsx b/packages/twenty-website/src/app/_components/ui/layout/FooterDesktop.tsxindex 73e092aa991..7b92e25a596 100644--- a/packages/twenty-website/src/app/_components/ui/layout/FooterDesktop.tsx+++ b/packages/twenty-website/src/app/_components/ui/layout/FooterDesktop.tsx@@ -77,6 +77,8 @@ export const FooterDesktop = () => {<divstyle={{width: '100%',+ maxWidth: '1200px',+ margin: '0 auto',display: 'flex',flexDirection: 'row',justifyContent: 'space-between',@@ -121,6 +123,8 @@ export const FooterDesktop = () => {<divstyle={{width: '100%',+ maxWidth: '1200px',+ margin: '0 auto',display: 'flex',flexDirection: 'row',justifyContent: 'space-between',diff --git a/packages/twenty-website/src/app/contributors/utils/get-activity-end-date.tsx b/packages/twenty-website/src/app/contributors/utils/get-activity-end-date.tsxnew file mode 100644index 00000000000..101d9b041f9--- /dev/null+++ b/packages/twenty-website/src/app/contributors/utils/get-activity-end-date.tsx@@ -0,0 +1,22 @@+const TOTAL_DAYS_TO_FULL_WIDTH = 232;++export const getActivityEndDate = (+ activityDates: { value: number; day: string }[],+) => {+ const startDate = new Date(activityDates[0].day);+ const endDate = new Date(activityDates[activityDates.length - 1].day);++ const differenceInMilliseconds = endDate.getTime() - startDate.getTime();++ const numberOfDays = Math.floor(+ differenceInMilliseconds / (1000 * 60 * 60 * 24),+ );++ const daysToAdd = TOTAL_DAYS_TO_FULL_WIDTH - numberOfDays;++ if (daysToAdd > 0) {+ endDate.setDate(endDate.getDate() + daysToAdd);+ }++ return endDate;+};