How can I import 2 objects with the same name but conditionally use them on the page
I tried this, but import can be only on top so it doesn't work
if (window.location.href.includes('showcase')) {
import { Tags } from "../../../data/folder1";
} else {
import { Tags } from "../../../data/folder2";
}
I tried also this but I'm stuck:
import { Tags } from "../../../data/folder1"
import { Tags } from "../../../data/folder2"
const PageTags = window.location.href.includes('showcase') ? Tags : Tags <=== issue here