Q: Show there exists a homeomorphism between Disjoint Union and Product 
Let $X$ be a topological space and $S$ a nonempty set. Let $\delta$ be the discrete topology on $S$ and define $X_s=X$ for all $s\in S$.
Show there exists a homeomorphism between $$\coprod_{s\in S}X_s \text{  and  }(S,\delta)\times X$$

I am a bit unsure if I am going about this correctly and would appreciate any help.
I need to show there exists a bijection $f$ between those two sets, such that $f$ and $f^{-1}$ are continuous.
Define $f:\coprod_{s\in S}X_i\rightarrow (S,\delta)\times X$, such that $f(s,x)=(s,x)$.
Trivially $f$ is bijective.
To show that $f$ is continuous, take $U$ open in $(S,\delta)\times X$. Then $U=U_1\times U_2$, such that $U_1$ is open in $(S,\delta)$ and $U_2$ is open in $X$. Now we see $f^{-1}(U)=U=U_1\times U_2$
Now $U$ is open in $\coprod_{s\in S}X_s$, if for the mapping $g:X_s\rightarrow X$, $g(x)=(s,x)$, that $g^{-1}(U)$ is open in $X_s$ for all $s\in S$. Thus choose $x\in U_2$, which garuntees $(s,x)\in U$ for all $s\in S$, and since $U_2$ is open then $g^{-1}(U)$ is open. It thus follows that $f$ is continuous.
I am not sure if the above logic makes sense, and apologize if it's completely wrong.
To show $f^{-1}$ is continuous, I have no clue how to go about it.
Any help would be much appreciated, and thanks in advance!

A: To show that $f$ is a homeomorphism we need to check continuity first (being a bijection is indeed pretty obvious).
For this it suffices that for a base $\mathcal{B}$ (or even subbase) of $(S, \delta) \times X$ we have that $f^{-1}[B]$ is open for all $B \in \mathcal{B}$. As a base for $(S,\delta)$ we can take all singletons, so a base for the product is given by all sets 
$$\mathcal{B} = \{ \{s\} \times U: U \text{ open in } X\}$$
and $f^{-1}[\{s\} \times U] = \{(s,y): y \in U\}$ which is just the copy of $U$ in $X_s$, the "$s$-th" copy of $X$. By definition of the sum topology this is open, as its intersection with each copy of $X$ is open in that copy (always empty except for the copy with index $s$, where it is $U$ which is open).
Similarly a base for the sum is given by all sets of the form $\{s\} \times U$ where $s \in S$ and $U$ open in $X$. And these have open images, so $f$ is an open map. 
So $f$ is essentially the identity and both spaces have identical bases. The homeomorphism is trivial.
