Skip to content

Commit de2e50a

Browse files
committed
Fix: 404 page inside communities accessed via subdomain
Fixes #511
1 parent 99034a1 commit de2e50a

File tree

10 files changed

+41
-10
lines changed

10 files changed

+41
-10
lines changed

src/shared/routes/Communities/Blockchain/Routes.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,15 @@ export default function Routes({ base, member, meta }) {
5858
exact
5959
path={`${base}/home`}
6060
/>
61+
<Route
62+
component={Error404}
63+
path={`${base}/:any`}
64+
/>
6165
<Route
6266
component={Home}
6367
exact
6468
path={`${base}`}
6569
/>
66-
<Route component={Error404} />
6770
</Switch>
6871
<Footer />
6972
</div>

src/shared/routes/Communities/Community2/Routes.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ export default function Wipro({ base, meta }) {
4141
exact
4242
path={`${base}/home`}
4343
/>
44+
<Route
45+
component={Error404}
46+
path={`${base}/:any`}
47+
/>
4448
<Route
4549
component={Home}
4650
exact
4751
path={`${base}`}
4852
/>
49-
<Route component={Error404} />
5053
</Switch>
5154
<Footer />
5255
</div>

src/shared/routes/Communities/DemoExpert/Routes.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ export default function Wipro({ base, meta }) {
4141
exact
4242
path={`${base}/home`}
4343
/>
44+
<Route
45+
component={Error404}
46+
path={`${base}/:any`}
47+
/>
4448
<Route
4549
component={Home}
4650
exact
4751
path={`${base}`}
4852
/>
49-
<Route component={Error404} />
5053
</Switch>
5154
<Footer />
5255
</div>

src/shared/routes/Communities/QA/Routes.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ export default function QA({ base, member, meta }) {
3535
exact
3636
path={`${base}/home`}
3737
/>
38+
<Route
39+
component={Error404}
40+
path={`${base}/:any`}
41+
/>
3842
<Route
3943
component={() => <Home member={member} />}
4044
exact
4145
path={`${base}`}
4246
/>
43-
<Route component={Error404} />
4447
</Switch>
4548
<Footer />
4649
</div>

src/shared/routes/Communities/SRMx/Routes.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ export default function Wipro({ base, meta }) {
4141
exact
4242
path={`${base}/home`}
4343
/>
44+
<Route
45+
component={Error404}
46+
path={`${base}/:any`}
47+
/>
4448
<Route
4549
component={Home}
4650
exact
4751
path={`${base}`}
4852
/>
49-
<Route component={Error404} />
5053
</Switch>
5154
<Footer />
5255
</div>

src/shared/routes/Communities/TaskForce/Routes.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ export default function Wipro({ base, meta }) {
3535
exact
3636
path={`${base}/home`}
3737
/>
38+
<Route
39+
component={Error404}
40+
path={`${base}/:any`}
41+
/>
3842
<Route
3943
component={Home}
4044
exact
4145
path={`${base}`}
4246
/>
43-
<Route component={Error404} />
4447
</Switch>
4548
<Footer />
4649
</div>

src/shared/routes/Communities/TcProdDev/Routes/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,15 @@ export default function TcProdDev({ base, meta }) {
8080
exact
8181
path={`${base}/home`}
8282
/>
83+
<Route
84+
component={Error404}
85+
path={`${base}/:any`}
86+
/>
8387
<Route
8488
component={Home}
8589
exact
8690
path={base}
8791
/>
88-
<Route component={Error404} />
8992
</Switch>
9093
<Footer />
9194
</div>

src/shared/routes/Communities/Veterans/Routes.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ export default function Routes({ base, meta }) {
4141
exact
4242
path={`${base}/home`}
4343
/>
44+
<Route
45+
component={Error404}
46+
path={`${base}/:any`}
47+
/>
4448
<Route
4549
component={Home}
4650
exact
4751
path={`${base}`}
4852
/>
49-
<Route component={Error404} />
5053
</Switch>
5154
<Footer />
5255
</div>

src/shared/routes/Communities/Wipro/Routes.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,15 @@ export default function Wipro({ base, meta }) {
8181
exact
8282
path={`${base}/home`}
8383
/>
84+
<Route
85+
component={Error404}
86+
path={`${base}/:any`}
87+
/>
8488
<Route
8589
component={Home}
8690
exact
8791
path={`${base}`}
8892
/>
89-
<Route component={Error404} />
9093
</Switch>
9194
<Footer />
9295
</div>

src/shared/routes/Communities/index.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@ export default function ChunkLoader({ base, communityId, member, meta }) {
4848
);
4949
}
5050

51+
ChunkLoader.defaultProps = {
52+
base: '',
53+
};
54+
5155
ChunkLoader.propTypes = {
52-
base: PT.string.isRequired,
56+
base: PT.string,
5357
communityId: PT.string.isRequired,
5458
member: PT.bool.isRequired,
5559
meta: PT.shape().isRequired,

0 commit comments

Comments
 (0)