Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
cache: 'npm'

- name: Install dependencies
run: npm install
run: npm ci

# Check: https://github.com/vercel/next.js/issues/53959
# https://github.com/vercel/next.js/issues/53959
# - name: Check types
# run: npm run check-types

Expand Down Expand Up @@ -61,8 +61,8 @@ jobs:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies for web
run: npm install --filter=@tech-companies-portugal/web
- name: Install dependencies
run: npm ci

- name: Cache Playwright browsers
id: playwright-cache
Expand All @@ -72,7 +72,7 @@ jobs:
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}

- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: apps/web
run: npx playwright install chromium --with-deps

- name: Run Playwright tests
Expand Down
27 changes: 11 additions & 16 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@
"test:e2e:ui": "start-server-and-test start http://localhost:3000 'playwright test --ui'"
},
"dependencies": {
"@radix-ui/react-collapsible": "1.1.2",
"@radix-ui/react-label": "2.1.1",
"@radix-ui/react-select": "2.1.4",
"@radix-ui/react-slot": "1.1.1",
"@radix-ui/react-collapsible": "1.1.11",
"@radix-ui/react-label": "2.1.7",
"@radix-ui/react-select": "2.2.5",
"@radix-ui/react-slot": "1.2.3",
"@tech-companies-portugal/analytics": "*",
"cheerio": "1.0.0-rc.12",
"class-variance-authority": "0.7.0",
"class-variance-authority": "0.7.1",
"clsx": "2.1.0",
"date-fns": "3.3.1",
"geist": "1.3.1",
"lucide-react": "0.469.0",
"lucide-react": "0.539.0",
"motion": "11.17.0",
"next": "15.2.3",
"next": "15.4.6",
"nuqs": "2.3.1",
"react": "19.0.0",
"react": "19.1.1",
"react-countup": "6.5.3",
"react-dom": "19.0.0",
"react-dom": "19.1.1",
"recharts": "2.15.0",
"sharp": "0.33.2",
"slugify": "1.6.6",
Expand All @@ -44,17 +44,12 @@
"@tech-companies-portugal/tailwind": "*",
"@tech-companies-portugal/typescript": "*",
"@types/node": "^20",
"@types/react": "19.0.2",
"@types/react-dom": "19.0.2",
"@types/react": "19.1.1",
"@types/react-dom": "19.1.1",
"autoprefixer": "^10.0.1",
"postcss": "^8",
"start-server-and-test": "2.0.10",
"tailwindcss": "^3.3.0",
"typescript": "^5"
},
"overrides": {
"@types/react": "19.0.2",
"@types/react-dom": "19.0.2",
"react-is": "19.0.0"
}
}
4 changes: 2 additions & 2 deletions apps/web/src/app/category/[category]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ export default async function CategoryPage({
<CompaniesList
allCompanies={filteredCompanies}
updatedAtISODate={updatedAtISODate}
showHeader={true}
hideUpdatedAt={true}
isDedicatedPage
hideUpdatedAt
/>
</Suspense>
</div>
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/location/[location]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export default async function LocationPage({
<CompaniesList
allCompanies={filteredCompanies}
updatedAtISODate={updatedAtISODate}
showHeader={true}
hideUpdatedAt={true}
isDedicatedPage
hideUpdatedAt
/>
</Suspense>
</div>
Expand Down
16 changes: 9 additions & 7 deletions apps/web/src/components/CompaniesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ const PAGE_SIZE = 15;
type CompaniesListProps = {
allCompanies: Company[];
updatedAtISODate: string;
showHeader?: boolean;
isDedicatedPage?: boolean;
hideUpdatedAt?: boolean;
};

export default function CompaniesList({
allCompanies,
updatedAtISODate,
showHeader = false,
isDedicatedPage = false,
hideUpdatedAt,
}: CompaniesListProps) {
const {
Expand All @@ -35,10 +35,12 @@ export default function CompaniesList({

const filteredCompanies = useMemo(
() =>
allCompanies.filter((company) =>
matchCompanies(company, query, category, location),
),
[allCompanies, query, category, location],
isDedicatedPage
? allCompanies
: allCompanies.filter((company) =>
matchCompanies(company, query, category, location),
),
[allCompanies, query, category, location, isDedicatedPage],
);

const paginatedCompanies = filteredCompanies.slice(start, end);
Expand All @@ -58,7 +60,7 @@ export default function CompaniesList({
</motion.div>
) : (
<div className="flex-1 font-mono" aria-label="Companies list">
{showHeader && (
{isDedicatedPage && (
<motion.div
className="mb-2 text-xs w-full flex flex-wrap items-center justify-between gap-2 text-muted-foreground"
initial={{ opacity: 0, y: -10 }}
Expand Down
Loading