Skip to content

Commit

Permalink
Merge branch 'stage' of https://github.com/AletheiaFact/aletheia into…
Browse files Browse the repository at this point in the history
… fix-load-search-overlay
  • Loading branch information
caneppelevitor committed Nov 25, 2024
2 parents 4dc3b77 + d9e0361 commit bb5fae2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
--build-arg NEXT_PUBLIC_ENVIRONMENT=$ENVIRONMENT \
--build-arg NEXT_PUBLIC_ORY_SDK_URL=$ORY_SDK_URL \
--build-arg NEXT_PUBLIC_ORYCLOUD=$ORYCLOUD \
--build-arg NEXT_PUBLIC_ENABLE_BANNER_DONATION=$ENABLE_BANNER_DONATION \
--build-arg NEXT_PUBLIC_RECAPTCHA_SITEKEY=${{ secrets.NEXT_PUBLIC_RECAPTCHA_SITEKEY }} \
-t "$ECR_REGISTRY"/"$IMAGE":"$GITHUB_SHA" .
docker tag "$ECR_REGISTRY"/"$IMAGE":"$GITHUB_SHA" "$ECR_REGISTRY"/"$IMAGE":latest
Expand Down
6 changes: 2 additions & 4 deletions server/auth/ory/ory.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ export default class OryController {
@Get("sessions/whoami")
public async whoAmI(@Req() req: Request, @Res() res: Response) {
try {
const sessionToken =
req.cookies["ory_kratos_session"] ||
req.headers["authorization"];
const data = await this.oryService.whoAmI(sessionToken);
// forward cookie string because the cookie names may vary between ory cloud installations
const data = await this.oryService.whoAmI(req.headers["cookie"]);
return res.status(200).json(data);
} catch (error) {
if (error.status) {
Expand Down
4 changes: 2 additions & 2 deletions server/auth/ory/ory.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ export default class OryService {
});
}

async whoAmI(sessionToken: string): Promise<any> {
async whoAmI(sessionCookies: string): Promise<any> {
return await fetch(`${this.url}/sessions/whoami`, {
headers: {
Cookie: `ory_kratos_session=${sessionToken}`,
Cookie: sessionCookies,
},
}).then((response) => {
if (response.ok) {
Expand Down
7 changes: 3 additions & 4 deletions src/components/Home/DonationBanner.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import colors from "../../styles/colors";
import { Col } from "antd";

const DonationBannerStyle = styled(Col)`
background-color: ${colors.blueQuartiary};
background-color: ${colors.quartiary};
.show-banner {
.show-banner {
color: ${colors.white};
font-size: 13px;
border: none;
Expand All @@ -24,12 +24,11 @@ const DonationBannerStyle = styled(Col)`
flex-direction: column;
align-items: center;
padding: 20px 0px;
}
.banner-content > h1 {
width: 100%;
color: ${colors.blackPrimary};
color: ${colors.black};
font-size: 26px;
line-height: 34px;
font-weight: 800;
Expand Down
14 changes: 13 additions & 1 deletion src/components/PaginetedDataGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DataGrid } from "@mui/x-data-grid";
import { DataGrid, GridToolbar } from "@mui/x-data-grid";
import React from "react";

const PaginatedDataGrid = ({ rows, columns, sx }) => {
Expand All @@ -11,6 +11,18 @@ const PaginatedDataGrid = ({ rows, columns, sx }) => {
<DataGrid
rows={rows}
columns={columns}
slots={{ toolbar: GridToolbar }}
slotProps={{
toolbar: {
showQuickFilter: true,
quickFilterProps: { debounceMs: 500 },
printOptions: { disableToolbarButton: true },
csvOptions: { disableToolbarButton: true },
},
}}
disableColumnFilter
disableColumnSelector
disableDensitySelector
paginationModel={paginationModel}
pageSizeOptions={[5, 10, 50]}
onPaginationModelChange={setPaginationModel}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/about-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const AboutPage: NextPage<{ data: string }> = () => {
);
};

export async function getServerSideProps({ locale, locales, req }) {
export async function getServerSideProps({ query, locale, locales, req }) {
locale = GetLocale(req, locale, locales);
query = JSON.parse(query.props);
return {
Expand Down

0 comments on commit bb5fae2

Please sign in to comment.